package com.Factory;

public class Cus1 implements Runnable {
    private Shelf shelf;

    public Cus1(Shelf shelf) {
        this.shelf = shelf;
    }

    @Override
    public void run() {
        int i = 0;
        while (i<10) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            i++;
            shelf.decrease();
        }
    }
}
